﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DailyApp.WPF.DTOs
{
    /// <summary>
    /// 统计待办事项DTO
    /// </summary>
    public class StatWaitDTO
    {
        /// <summary>
        /// 总待办项
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 已完成项
        /// </summary>
        public int FinshedCount { get; set; }

        /// <summary>
        /// 已完成项百分比
        /// </summary>
        public string FinshedPercent
        {
            get
            {
                //避免除数为0
                if (TotalCount == 0)
                    return "00.00%";

                return (FinshedCount * 100.00 / TotalCount).ToString("f2") + "%";
            }
        }
    }
}
